import { ref } from "vue";
import service from "../index.js";

const occupancyApi = {
    //查询所有的预约
    selectAll(){
        return service.get('/user/occupancy');
    },
    //查询某一个预约
    selectById(id){
        return service.get(`/user/occupancy/${id}`)
    },
    // 添加预约
    insert(occupancy){
        return service.post('/user/occupancy',occupancy)
    },
    // 更新预约
    update(occupancy){
        return service.put('/user/occupancy',occupancy)
    },
    // 删除预约
    delete(id){
        return service.delete(`/user/occupancy/${id}`)
    },
}
export default occupancyApi;